//
//  CORecivePersonInfoCell.m
//  MJApp
//
//  Created by John on 15/3/30.
//  Copyright (c) 2015年 wangliang. All rights reserved.
//

#import "CORecivePersonInfoCell.h"
@interface CORecivePersonInfoCell()
@property (weak, nonatomic) IBOutlet UILabel *reciePersonNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *recievePersonPhoneLabel;
@property (weak, nonatomic) IBOutlet UILabel *recieAddrLabel;

@end
@implementation CORecivePersonInfoCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}
+ (instancetype)cellForTableview:(UITableView *)tableview{
    static NSString * ID = @"CORecivePersonInfoCell";
    CORecivePersonInfoCell * cell = [tableview dequeueReusableCellWithIdentifier:ID];
    if (cell == nil) {
        cell = [[NSBundle mainBundle] loadNibNamed:ID owner:nil options:nil].lastObject;
        
    }
    cell.cellH = CGRectGetMaxY(cell.reciePersonNameLabel.frame)+8+CGRectGetHeight(cell.recieAddrLabel.frame)+25;
    return cell;
    
}

- (void)setInfoDic:(NSDictionary *)infoDic {
    
    [super setInfoDic:infoDic];
    self.reciePersonNameLabel.text = infoDic[@"name"];
    self.recieAddrLabel.text = [NSString stringWithFormat:@"%@%@%@%@",infoDic[@"economize"],infoDic[@"city"],infoDic[@"area"],infoDic[@"address"]];
    self.recievePersonPhoneLabel.text = infoDic[@"phone"];
}

@end
